package com.lm.jasync.controller;

import com.lm.jasync.entry.SysUserEntity;
import com.lm.jasync.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.concurrent.CompletableFuture;

@RestController
@RequestMapping("/user")
public class UserController {

    @Autowired
    private UserService userService;


    @GetMapping("/all")
    public CompletableFuture<List<SysUserEntity>> getUsers() {
        return userService.findAllUsers();
    }
}
